<dev xmlns="http://www.w3.org/1999/xhtml"
     xmlns:ui="http://java.sun.com/jsf/facelets"
     xmlns:h="http://java.sun.com/jsf/html"
     xmlns:c="http://java.sun.com/jsp/jstl/core"
     xmlns:f="http://java.sun.com/jsf/core"
     xmlns:p="http://primefaces.org/ui">
    <c:set var="root" value="#{request.contextPath}" />

    <ui:composition template="../template/common.xhtml" >
        <ui:define name="topComponents">
            <c:set var="activeItem" value="productPage"/>
            <ui:include src="../navigator.xhtml" />
        </ui:define>
        <ui:define name="content">
            <div class="span12">
                <div class="well"> 
                    <h:form id="usersForm">
                        <p:dataTable var="supp" value="#{supplierBrowseCtrl.dataModel}" selectionMode="single" selection="#{supplierBrowseCtrl.selected}" paginator="true" rows="10" lazy="true"
                                     rowKey="#{supp.id}" paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink}" >
                            <p:column headerText="Id" sortBy="#{supp.id}" filterBy="#{supp.id}">
                                <h:outputText value="#{supp.id}" />
                            </p:column>
                            <p:column headerText="Name" sortBy="#{supp.name}" filterBy="#{supp.name}" filterMatchMode="contains">
                                <h:outputText value="#{supp.name}" />
                            </p:column>
                            <p:column headerText="Email" sortBy="#{supp.email}" filterBy="#{supp.email}" filterMatchMode="contains">
                                <h:outputText value="#{supp.email}" />
                            </p:column>
                            <p:column headerText="Phone" sortBy="#{supp.phone}" filterBy="#{supp.phone}" filterMatchMode="contains">
                                <h:outputText value="#{supp.phone}" />
                            </p:column>
                            <p:column headerText="Address" sortBy="#{supp.address}" filterBy="#{supp.address}" filterMatchMode="contains">
                                <h:outputText value="#{supp.address}" />
                            </p:column>
                        </p:dataTable>
                        <p:commandButton value="Create" action="createSupplierPage" />
                        <p:commandButton value="Edit" action="editSupplierPage"/>
                        <p:commandButton value="Delete" action="#{supplierBrowseCtrl.delete()}" ajax="false" />
                    </h:form>
                </div>
            </div>
        </ui:define>
    </ui:composition>
</dev>